package com.weiiew.calculationService.craft.Craft3;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;


/**
 * @Description
 * @Author 魏锴
 * @Date 2025/3/17
 */

@Data
@NoArgsConstructor
public class RecipeNode implements Node{
    private int id; // 记录物品id
    private double number; // 使用 double 计算能量
    private List<Edge> edges; // 邻接节点及其边的权重


    RecipeNode(int id) {
        this.id = id;
        this.number = 0;
        this.edges = new ArrayList<>();
    }

    void addEdge(int target, double weight) {
        edges.add(new Edge(target, weight, 0.0));
    }

    @Override
    public void addNumber(double number) {

    }
}